﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microhard.WeixinMP.Interfaces;
using Microhard.WeixinMP.Models;
using System.ServiceModel.Dispatcher;

namespace Microhard.WeixinMP.Impls
{
    public class Web_LoginParserImpl : IWeixinMPHtmlParser<WeixinFakeLogin_Result>
    {
        public WeixinFakeLogin_Result ParseObject(string html)
        {
            //获得taoken
            //            {
            //"Ret": 302,
            //"ErrMsg": "/cgi-bin/home?t=home/index&lang=zh_CN&token=180904257",
            //"ShowVerifyCode": 0,
            //"ErrCode": 0
            //}

            JsonQueryStringConverter jqsv = new JsonQueryStringConverter();
            return (WeixinFakeLogin_Result)jqsv.ConvertStringToValue(html, typeof(WeixinFakeLogin_Result));
         
        }
    }
}
